#include"my_stdio.h"
#include<stdio.h>
#include<string.h>
#include<unistd.h>
int main()
{
    MyFILE* mf = mfopen("./log.txt","a");
    if(mf==NULL)
    {
        return 1;
    }
    int cnt = 10;
    while(cnt)
    {
        char ch[1024];
        snprintf(ch,sizeof(ch),"hello cqy : %d\n",cnt);
        cnt--;
        mfwrite(ch,strlen(ch),mf);
        mfflush(mf);
        sleep(1);
    }
    mfclose(mf);
    return 0;
}
